<ion-header no-border align-title="center">

  <ion-navbar color="primary">
    <ion-title mode="ios">房间</ion-title>

    <ion-buttons end class="empty-button">
      <button ion-button >
        <ion-icon></ion-icon>
      </button>
    </ion-buttons>
  </ion-navbar>

</ion-header>

<ion-content padding [ngSwitch]="room.check_in_status">

  <ion-list class="item-info">
    <ion-item>
      <h2>房间名称：</h2>
      <p>{{room.room_name}}</p>
    </ion-item>
    <ion-item>
      <h2>地址：</h2>
      <p>{{room.build_address}}</p>
    </ion-item>
    <ion-item>
      <h2>联系人：</h2>
      <p>{{room.check_in_contact}}</p>
    </ion-item>
    <ion-item>
      <h2>联系电话：</h2>
      <p>{{room.check_in_mobile}}</p>
    </ion-item>
    <ion-item>
      <h2>入住日期：</h2>
      <p>{{room.check_in_date}}</p>
    </ion-item>
    <ion-item>
      <h2>入住状态：</h2>
      <p>{{room.check_in_status_name}}</p>
    </ion-item>
  </ion-list>

  <ion-row *ngSwitchCase="'1'">
    <ion-col>
      <button ion-button class="button-full" (click)="setCheckOut(room.check_in_id)" color="orange">设置退租</button>
    </ion-col>
  </ion-row>

  <ion-row *ngSwitchCase="'0'">
    <ion-col>
      <button ion-button class="button-full" (click)="setCheckIn()" color="primary">设置新入住</button>
    </ion-col>
  </ion-row>

  <ion-row *ngSwitchCase="'1'">
    <ion-col>
      <button ion-button class="button-full" (click)="settlement(room.check_in_id)" color="danger">收租</button>
    </ion-col>
  </ion-row>

  <ion-row>
    <ion-col>
      <button ion-button class="button-full" (click)="checkHistory(room.check_in_id)" color="secondary">查看历史记录</button>
    </ion-col>
  </ion-row>

</ion-content>
